package com.mm.learn.spring;/**
 * @author wdx
 * @create 2021-08-26 15:58
 */

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author wdx
 * @date 2021年08月26日 15:58
 */
public class SpringLearn {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(Config.class);
//        context.getBeanDefinitionNames();
//        Object wdd = context.getBean("&wdd");
//        Object wdd1 = context.getBean("dd");
//        System.out.println(wdd);
        Object bean1 = context.getBeanFactory().getBean("dd");
//        Object bean2 = context.getBeanFactory().getBean("com.mm.learn.spring.Dd");
//        System.out.println(bean1 == bean2);
        for (String beanDefinitionName : context.getBeanDefinitionNames()) {
            System.out.println(beanDefinitionName);

        }
//        System.out.println(wdd1);
    }
}
